<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/1/3
 * Time: 13:23
 */
class User_wechat extends MY_Model
{
    function __construct()
    {
        parent::__construct();
        $this->_table_name = 'sina_users';
    }

    function get_user_by_sina($sina_id){
        $this->db->where('sina_id',$sina_id);
        $this->db->limit(1);
        $query = $this->db->get($this->_table_name);
        if($query->num_rows()>0){
            return $query->result_array()[0];
        }
        return null;
    }

}